#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Unit Test for HtmlProcessor

@author Wang Qiang
"""

import unittest 
from HtmlProcess import HtmlProcessor
import urllib2


class UnitTest(unittest.TestCase):
    """
    test for HtmlProcessor
    """
    testUrl = 'http://sports.163.com/11/0913/08/7DQN4M9E00051CDG.html'
    html = urllib2.urlopen(testUrl).read()

    def testHtmlProcessor(self):
        myProcessor = HtmlProcessor('./formats/news/163.xml')
        myProcessor.feedHtml(self.html)
        myProcessor.extractFormat()
        myProcessor.process()
        print myProcessor.res
        self.assertEqual(1, 1)
        self.assertTrue(True)
   

if __name__ == '__main__':
    # Test all
    unittest.main()

